import request from '../../../utils/request'

// 查询操作日志列表
export function list (query) {
  return request({
    url: '/system/monitor/operationLog/list',
    method: 'get',
    params: query
  })
}

// 删除操作日志
export function delOperlog (operId) {
  let operIds = []
  if (!Array.isArray(operId)) {
    operIds.push(operId)
  } else {
    operIds = operId
  }
  return request({
    url: '/system/monitor/operationLog/delete',
    method: 'delete',
    data: operIds
  })
}

// 清空操作日志
export function cleanOperlog () {
  return request({
    url: '/system/monitor/operationLog/clear',
    method: 'delete'
  })
}

// 导出操作日志
export function exportOperlog (query) {
  return request({
    url: '/monitor/operationLog/export',
    method: 'get',
    params: query
  })
}
